package cn.net.yto.school.dao.entities;

import cn.net.yto.base.dao.entities.TAccount;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.io.Serializable;
import java.sql.Timestamp;

/**
 * tb_course_student 实体类
 * Created by gaojing
 * Wed Jul 18 20:11:47 CST 2018
 */
@Entity
@Table(name = "tb_course_student")
@IdClass(MCourseStudent.class)
@Data
@NoArgsConstructor
public class TbCourseStudent implements Serializable {
    private static final long serialVersionUID = -7736618778719665064L;
    /**
     *
     */
    @Id
    @ManyToOne
    @JoinColumn(name = "stu_id", referencedColumnName = "stu_id")
    private TbStudent stuId;

    /**
     *
     */
    @Id
    @ManyToOne
    @JoinColumn(name = "c_id", referencedColumnName = "c_id")
    private TbCourse cId;

    /**
     *
     */
    @Column(name = "create_time")
    private Timestamp createTime;

    /**
     *
     */
    @Column(name = "update_time")
    private Timestamp updateTime;

    /**
     * 操作员
     */
    @ManyToOne
    @JoinColumn(name = "actor", referencedColumnName = "ACCT_ID")
    private TAccount actor;


}

